package com.aaa.sbms.dao;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

public interface RepairDao {
    @Select("<script>select USERID,USERNAME,ROOM,REDATE,STATE from houserepaire " +
            "<if test=\"USERID!=null and USERID!=''\"> where USERID like concat('%',#{USERID},'%') </if>" +
            "<if test=\"USERNAME!=null and USERNAME!=''\"> where USERNAME like concat('%',#{USERNAME},'%')  </if>" +
            "<if test=\"ROOM!=null and ROOM!=''\"> where ROOM like concat('%',#{ROOM},'%')  </if>" +
            "</script>")
    List<Map> list(Map map);

    @Update("update houserepaire  set STATE=1 where ROOM=#{ROOM}")
    Integer updateIng(Integer ROOM);
}
